/*
** comread.c
**
** Pictor, Version 1.51, Copyright (c) 1992-94 SoftCircuits
** Redistributed by permission.
*/

#include "comlib.h"

/*
** Reads count bytes from the communications port.
** Returns 0 if successful, -1 if error.
*/
int comread(char *buffer,int count)
{
	int i;

	for(i = 0;i < count;i++) {
		if(comgetc(&buffer[i]))
			return(-1);
	}
	return(0);

} /* comread */
